﻿
<div>
    <form name="areaCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.area.id">编辑信息:{{vm.area.name}}</span>
                <span ng-if="!vm.area.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">
            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <select chosen search_contains="true" ng-model="vm.area.parentId" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-disabled="vm.disabled">
                    <option ng-repeat="x in vm.areaList" value="{{x.value}}" ng-selected="vm.area.parentId==x.value">{{x.displayText}}</option>
                </select>
                <label>所属父网格</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2" ng-show="false">
                <input type="text" class="form-control" name="Code" ng-class="{'edited':vm.area.code}" ng-model="vm.area.code" maxlength="50" />
                <label>行政区划代码</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Title" ng-class="{'edited':vm.area.title}" ng-model="vm.area.title" maxlength="100" required />
                <label>@L("Title")</label>
                <span class="help-block">     @L("Title")@L("MustBe_Required")</span>
            </div>


            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2" ng-show="false">
                <input type="text" class="form-control" name="FirstLetter" ng-class="{'edited':vm.area.firstLetter}" ng-model="vm.area.firstLetter" maxlength="50" />
                <label>英文首字母</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label class="font-noraml" style="display: none;">文件选择（单选）</label>
                <div>
                    <input type="file" class="form-control" style="display: none;">
                    <div class="input-append input-group" ng-click="vm.fileClick()">
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="button">选择文件</button>
                        </span>
                        <input class="input-large form-control" type="text" value="{{vm.fileUrl}}" style="width: 780px !important;padding-left: 10px;">
                    </div>
                </div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2" ng-show="false">
                <input id="FileID" type="file" name="FileID" nv-file-select uploader="vm.uploader" />
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="XPoint" ng-class="{'edited':vm.area.xPoint}" ng-model="vm.area.xPoint" maxlength="100" required />
                <label>@L("XPoint")</label>
                <span class="help-block">     @L("XPoint")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="YPoint" ng-class="{'edited':vm.area.yPoint}" ng-model="vm.area.yPoint" maxlength="100" required />
                <label>@L("YPoint")</label>
                <span class="help-block">     @L("YPoint")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="number" class="form-control" name="Households" ng-class="{'edited':vm.area.households}" ng-model="vm.area.households" required />
                <label>@L("Households")</label>
                <span class="help-block">     @L("Households")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="number" class="form-control" name="PersonNum" ng-class="{'edited':vm.area.personNum}" ng-model="vm.area.personNum" required />
                <label>@L("PersonNum")</label>
                <span class="help-block">     @L("PersonNum")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="MonitorUserId" ng-class="{'edited':vm.area.monitorUserId}" ng-model="vm.area.monitorUserId" required />
                <label>@L("MonitorUserId")</label>
                <span class="help-block">     @L("MonitorUserId")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="MonitorPwd" ng-class="{'edited':vm.area.monitorPwd}" ng-model="vm.area.monitorPwd" required />
                <label>@L("MonitorPwd")</label>
                <span class="help-block">     @L("MonitorPwd")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="CameraID" ng-class="{'edited':vm.area.cameraID}" ng-model="vm.area.cameraID" required />
                <label>@L("CameraID")</label>
                <span class="help-block">     @L("CameraID")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <div class="ueditor" ng-model="vm.area.remarks" style="width: 100%;"></div>
            </div>

        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="areaCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>